import React from 'react'
import {connect} from 'react-redux'
import {bindActionCreators} from 'redux'
import Friend from '../pages/friend/friend'
import  * as actionCreator from '../store/actions/socket'
class FriendContainer extends React.Component{

    static navigationOptions = {
        headerTitle:'通讯'
    }

    render(){
        return (
            <Friend {...this.props} />
        )
    }
}

const mapStateToProps = state => {
    return state.user
}

const mapDispatchToProps = dispatch => {
    const actions = bindActionCreators(actionCreator,dispatch)
    return {actions}
}

export default connect(mapStateToProps,mapDispatchToProps)(FriendContainer)